/*
  @author NormanMises
  @date 2023/6/6 - 21:16
*/

package com.example.demo.controller.user.account;

import com.example.demo.service.user.account.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.*;
@ResponseBody
@RestController
public class LoginController {
    @Autowired
    private LoginService loginService;
    @PostMapping("/user/account/token/")
    public Map<String, String> getToken(@RequestParam Map<String, String> map) {
        String username=map.get("username");
        String password=map.get("password");
        return loginService.getToken(username,password);
    }
}
